Skip to content

fix: rewrite inappropriate advice to use ls command in example dialogues in system prompt#23135

Open
ariane-emory wants to merge 19 commits intoanomalyco:devfrom
ariane-emory:fix/lingering-list-references
Open

fix: rewrite inappropriate advice to use ls command in example dialogues in system prompt#23135
ariane-emory wants to merge 19 commits intoanomalyco:devfrom
ariane-emory:fix/lingering-list-references

Conversation

@ariane-emory
Copy link
Copy Markdown
Contributor

@ariane-emory ariane-emory commented Apr 17, 2026

Issue for this PR

Closes #23132

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Rewrites some of the verbiage in the example dialogues in three model system prompts to avoid recommending direct use of the ls command.

How did you verify your code works?

bun test, bun typecheck.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The list tool no longer exists, so prompt examples should not tell models
to use it. Rewrite the lingering references to use glob-based examples
that match the current toolset.
The plain-language examples in the default and trinity prompts should read
like direct answers, not bracketed stage directions. Rewrite the follow-up
glob-based examples to keep the wording natural.
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added Vouched needs:compliance This means the issue will auto-close after 2 hours. contributor and removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@ariane-emory ariane-emory marked this pull request as ready for review April 17, 2026 17:29
@rekram1-node
Copy link
Copy Markdown
Collaborator

@ariane-emory why not recommend the read tool? Read tool can list things, why would we want to do glob?

@ariane-emory ariane-emory marked this pull request as draft April 17, 2026 17:35
The read tool can list directory contents, so the prompt examples should
recommend it instead of glob for these directory-inspection cases.
@ariane-emory ariane-emory marked this pull request as ready for review April 17, 2026 17:39
@ariane-emory
Copy link
Copy Markdown
Contributor Author

ariane-emory commented Apr 17, 2026

@rekram1-node Done. :) It doesn't seem to wanna run my CI, though. :/

@rekram1-node
Copy link
Copy Markdown
Collaborator

ci requires manual approval now, it's too expensive otherwise

Comment on lines 36 to 38
user: what command should I run to list files in the current directory?
assistant: ls
assistant: Use the read tool.
</example>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait now that im reading this, the change doesnt make any sense at all haha why did we edit this at all? It should stay ls

Copy link
Copy Markdown
Contributor Author

@ariane-emory ariane-emory Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted. Made sense to me though, since bash tool's description says not to use ls for exploratory purposes?

<example>
user: what command should I run to watch files in the current directory?
assistant: [use the ls tool to list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files]
assistant: Use read to inspect files in the current directory, then read docs/commands in the relevant file to find out how to watch files.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think list the works still

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there is no list tool at all anymore?

<example>
user: what files are in the directory src/?
assistant: [runs ls and sees foo.c, bar.c, baz.c]
assistant: [tool_call: read for absolute_path '/path/to/project/src', reports seeing foo.c, bar.c, baz.c]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reads src/ and sees

<example>
user: list files here.
model: [tool_call: ls for path '/path/to/project']
model: [tool_call: read for absolute_path '/path/to/project']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to be so specific it doesnt have to be absolute

<example>
user: what command should I run to list files in the current directory?
assistant: ls
assistant: Use the read tool.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bash tool's description advises not to use ls for exploratory purposes, so I thought it made sense. If you prefer ls, we can stick with that, though.

@ariane-emory
Copy link
Copy Markdown
Contributor Author

@rekram1-node If it's costly, then let's wait until you think it looks nice before we trigger CI again I suppose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove lingering advice to use an ls command in 3 models' system prompts

2 participants